When an image of an object is captured through multiple lenses with different optical axes, the location in which the object image is formed shifts between multiple captured images, depending on the object distance. This shift is called “parallax”. The distance to the object can be measured if this parallax can be obtained from multiple captured images. Attempts have been made at utilizing imaging apparatuses with distance measuring capability based on this principle for exterior monitoring, forward monitoring, and passenger monitoring, etc. onboard vehicles and in robots, as well as for automatic control and safety technology.
Stereo cameras heretofore have been developed, in which two cameras with different optical axes are secured to a frame etc., two images are captured, and these two images are used to measure the distance to an object. Typically the method used to obtain a parallax from two captured images consists in dividing one of the two captured images into multiple blocks, retrieving the locations of blocks corresponding to each of the blocks in the other image, determining the amount of shift between the two images on a block-by-block basis, and using the amount of shift as the amount of parallax. In this method, distance measurement errors are generated if certain differences between the two images occur as a result of factors other than parallax.
In addition to parallax, factors that produce differences between the two images include errors in the mounting of the two cameras. For instance, the resultant parallax varies and errors are introduced into object distances depending on the relative relationship between the optical axes of the two cameras. Therefore, it is important to secure the two cameras to the frame, etc. with accuracy.
In order to reduce problems related to camera mounting accuracy, it is known to use a compound eye type imaging apparatus with distance measuring capability combining multiple lenses and imaging elements and permitting further miniaturization (e.g. see Patent Document 1 and Patent Document 2).
FIG. 10 shows an outline of the configuration, as well as the image processing path, of a conventional compound eye type imaging apparatus with distance measuring capability. This imaging apparatus includes a lens array 100, which is made up of two lenses 100a, 100b disposed in a substantially coplanar alignment such that their optical axes are mutually parallel, and two imaging areas 101a, 101b respectively corresponding to the two lenses 100a, 100b. The two imaging areas 101a, 101b are obtained by dividing the light-receiving region of a single shared imaging element. A lens barrel 102 shields the two optical paths between the lenses 100a, 100b and imaging areas 101a, 101b from the outside environment so as to prevent light rays that do not pass through the two lenses 100a, 100b from being incident on the imaging areas 101a, 101b. Moreover, a baffle wall 150 is interposed between the two optical paths in order to prevent light rays passing through either one of the lenses 100a, 100b from being incident on the imaging area among the imaging areas 101a, 101b that does not correspond to the above-mentioned lens.
This imaging apparatus can reduce the degradation in distance measurement accuracy caused by errors in the mounting of the two optical systems, which occurred in conventional stereo cameras, by molding the two lenses 100a, 100b integrally as a lens array 100 and creating two imaging areas 101a, 101b by dividing the light-receiving region of a single imaging element. Moreover, the provision of the baffle wall 150 between the lenses 100a, 100b allows for disposing the lenses 100a, 100b in such close proximity that their respective imaging areas overlap, thereby allowing for compact, inexpensive imaging elements to be used.
In such a compound eye type imaging apparatus, the imaging areas 101a, 101b capture two images and the parallax amount derivation means 106 determines the amount of parallax from the two images. The parallax amount derivation means 106 is composed of a block division unit 107, which divides one of the two images into multiple blocks, and a corresponding location retrieval unit 108, which retrieves the locations of blocks corresponding to each of the blocks in the other image.
The method used by the parallax amount derivation means 106 for computing the amount of parallax will be explained in detail with reference to FIG. 11.
In FIG. 11, the reference numeral 400a designates an image captured by the imaging area 101a and 400b designates an image captured by the imaging area 101b. The images 400a, 400b are aggregates of intensity information related to multiple pixels disposed in a matrix layout in the X-axis direction (horizontal direction) and Y-axis direction (vertical direction), respectively. The image 400a serves as a reference image. This image 400a is divided into multiple blocks. Each block contains a predetermined number of pixels. The reference numeral 401a designates one of the multiple blocks produced by the division. The image 400b serves as a comparison image, and a block 401b, which has the same size as the above-mentioned block 401a, is provided inside this image 400b. A two-dot chain line 401b′ indicates the location of a block whose X-coordinate values and Y-coordinate values are the same as those of the block 401a, and is a reference location of the block 401b corresponding to the block 401a. In the comparison image 400b, the location of the block 401b is displaced relative to the reference location 401b′ in the X-direction and Y-direction and a difference (i.e. correlation) between the image in the block 401a and the image in the block 401b is obtained for each location of the block 401b. The amount of displacement in the X-direction, m, and the amount of displacement in the Y-direction, n, of the block 401b relative to the reference location 401b′, at which the difference is minimal (that is, the correlation is maximal), constitutes the amount of parallax in each direction. The distance to the object captured in the block 401a can be obtained using this amount of parallax.    Patent Document 1: JP 2003-143459A.    Patent Document 2: JP H07 (1995)-154663A.    Patent Document 3: JP H02 (1990)-280102A.